Skip to content

feat: prove Steam trade offer state via notary for buyer-side trades - #418

Open
Step7750 wants to merge 12 commits into
masterfrom
feat/csf-1979-notary-offer-state
Open

Step7750 wants to merge 12 commits into
masterfrom
feat/csf-1979-notary-offer-state

Conversation

@Step7750

@Step7750 Step7750 commented Sep 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Buyers now submit a notarized GetTradeOffer(s) proof for pending trades when the offer state they see on Steam differs from CSFloat's, or the trade is waiting on a cancel ping. Lets the offer state update from verified data when the seller is offline.
  • Skips offers changed in the last 5 minutes and accepted offers; batches multiple candidates into one proof.
  • Reuses the alarm's existing GetTradeOffers fetch; runs after other telemetry and shares the background notary failure cooldown.
  • Gated behind the offer_state notary meta flag.

Ref CSF-1979


Note

Medium Risk
Changes trade lifecycle ordering and trusted state updates for pending offers; mistakes could mis-report cancellations or offer state, though feature flags, age gates, and shared failure cooldown limit blast radius.

Overview
Adds buyer-side background notary proofs so CSFloat can refresh Steam trade offer state from verified GetTradeOffer(s) data when what the buyer sees on Steam disagrees with the server, or when a trade is waiting on a cancel ping and the offer is no longer active. Proving is gated by the new offer_state notary meta flag, skips offers changed in the last 5 minutes (seller ping first) and accepted offers, and batches multiple candidates into one received-offers proof.

The trade-status alarm now fetches sent/received offers once per run and passes that snapshot into sent-offer pings, cancel pings, and offer-state proving. Offer-state proving runs after other telemetry but before cancel pings so notarized state lands before the untrusted “offer is gone” signal.

Notary plumbing is refactored: submitNotaryProof is shared, notary meta is cached for 30 minutes (failed fetches are not cached), and SteamOffer gains optional updated_at / notarized_at fields for timing decisions.

Reviewed by Cursor Bugbot for commit ab0a921. Bugbot is set up for automated code reviews on this repo. Configure here.

@Step7750
Step7750 requested a review from GODrums September 4, 2026 03:34

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b5c76ef. Configure here.

Comment thread src/lib/alarms/csfloat_trade_pings.ts
@Step7750
Step7750 force-pushed the feat/csf-1979-notary-offer-state branch from b5c76ef to 94aa8ca Compare October 14, 2026 04:30
@Step7750

Copy link
Copy Markdown
Collaborator Author

@GODrums Apologies for the delay, this should now be ready to review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants